import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/login', component: () => import('@/views/login/LoginPage.vue') },
    { path: '/day', component: () => import('@/views/bill/BillDay.vue') },
    { path: '/',
      component: () => import('@/views/layout/LayoutContainer.vue'),
      redirect: '/login',
      children: [
        { path: '/bill/layout', component: () => import('@/views/bill/BillLayout.vue') },
        { path: '/bill/manage', component: () => import('@/views/bill/BillManage.vue') },
        { path: '/user/avater', component: () => import('@/views/user/UserAvater.vue') },
        { path: '/user/profile', component: () => import('@/views/user/UserProfile.vue') },
        { path: '/user/password', component: () => import('@/views/user/UserPassword.vue') },
        { path: '/user/protect', component: () => import('@/views/user/UserProtect.vue') }
      ]
    }
  ]
})

export default router
